
%% GUI building

% doc uicontrol

% Create an empty figure
F=figure;

% Call a function upon close (This is simple example, but doesn't do
% anything new)
myCloseFnc=@(src,callbackdata)delete(src)
F.CloseRequestFcn=myCloseFnc

% Position = [left bottom width height]
% doc Uicontrol Properties

% Make a pushbutton
% Setep Callback
MyPBPush = @(src,callbackdata)beep;

PB = uicontrol(F,'Style', 'pushbutton', 'String', 'Press Me!',...
        'Position', [20 20 50 20],...
        'Callback', MyPBPush);       





%% Using a GUI from a class

%See FirstOrderPoly.m
FOP=FirstOrderPoly()

FOP.A=1;
FOP.B=2;
FOP.plotLine();

% Do this with a gui
FOP.gui




